package com.module.ble.ringMonitorService

import com.module.ble.db.table.UserBloodOxygen
import com.module.ble.db.table.UserBodyTemperature
import com.module.ble.db.table.UserHeartRate
import com.module.ble.listener.CusSynthesisHealthExpandListener
import com.module.ble.utils.AizoSDKUtil

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：2025/4/14
 *
 * 描述：运动监听服务
 *
 * 修订历史：
 *
 */
class SportMonitorService: BaseMonitorService(), CusSynthesisHealthExpandListener {

    // 实现基类抽象方法
    override fun getNotificationId(): Int = NOTIFICATION_ID

    override fun getChannelId(): String = CHANNEL_ID

    override fun getChannelName(): String = "运动监测"

    override fun getChannelDescription(): String = "实时采集运动戒指传感器数据"

    override fun getNotificationTitle(): String = "运动数据采集中"

    override fun initListener() {
        AizoSDKUtil.addSynthesisHealthExpandListener(this)
    }

    override fun cleanupListener() {
        AizoSDKUtil.removeSynthesisHealthExpandListener(this)
    }

    companion object {
        private const val CHANNEL_ID = "sport_monitor_channel"
        private const val NOTIFICATION_ID = 1008611
    }

    override fun onLatestHr(value: Int, macStr: String, time: Long) {
    }

    override fun onHeartRateDataListResult(result: List<UserHeartRate>) {
    }

    override fun getLatestBloodOxygen(value: Int, macStr: String, time: Long) {
    }

    override fun onBloodOxygenDataListResult(result: List<UserBloodOxygen>) {
    }

    override fun onLatestBodyTemper(value: Float, macStr: String, time: Long) {
    }

    override fun onBodyTemperDataListResult(result: List<UserBodyTemperature>) {
    }

    override fun onMeasureResult(
        result: Boolean,
        type: Int,
        time: Long,
        heartRate: Int,
        bloodOxygen: Int,
        bodyTemp: Float,
        envTemp: Float
    ) {
    }
}